home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 476-500 / disk_487 / pprint / source / gadgets.c < prev    next >
C/C++ Source or Header  |  1992-05-06  |  7KB  |  262 lines

  1. /************************************************************************
  2. *                                                                                                *
  3. *        gadgets.c                                                                            *
  4. *                                                                                                *
  5. *-----------------------------------------------------------------------*
  6. *                                                                                                *
  7. *        Gadget definitions.                                                                *
  8. *                                                                                                *
  9. ************************************************************************/
  10.  
  11. #include <exec/types.h>
  12. #include <intuition/intuition.h>
  13.  
  14. /***************************************
  15.  
  16.                 External references
  17.  
  18. ***************************************/
  19.  
  20. IMPORT    struct Image        PreInit_uns_image,
  21.                                     PreInit_sel_image,
  22.                                     PPW_uns_image,
  23.                                     PPW_sel_image,
  24.                                     PrAll_uns_image,
  25.                                     PrAll_sel_image;
  26.  
  27. /************************************************************************
  28. *                                                                                                *
  29. *        Gadgets 0 - 9 ( Name : Num0 - Num9 )( Linked to the first list )    *
  30. *                                                                                                *
  31. ************************************************************************/
  32.  
  33. struct Gadget        Num9    =
  34. {
  35.     NULL, 199, 0, 21, 13, GADGHNONE, RELVERIFY, BOOLGADGET, NULL, NULL,
  36.     NULL, NULL, NULL, 9, NULL
  37. };
  38. struct Gadget        Num8    =
  39. {
  40.     &Num9, 178, 0, 21, 13, GADGHNONE, RELVERIFY, BOOLGADGET, NULL, NULL,
  41.     NULL, NULL, NULL, 8, NULL
  42. };
  43. struct Gadget        Num7    =
  44. {
  45.     &Num8, 157, 0, 21, 13, GADGHNONE, RELVERIFY, BOOLGADGET, NULL, NULL,
  46.     NULL, NULL, NULL, 7, NULL
  47. };
  48. struct Gadget        Num6    =
  49. {
  50.     &Num7, 136, 0, 21, 13, GADGHNONE, RELVERIFY, BOOLGADGET, NULL, NULL,
  51.     NULL, NULL, NULL, 6, NULL
  52. };
  53. struct Gadget        Num5    =
  54. {
  55.     &Num6, 115, 0, 21, 13, GADGHNONE, RELVERIFY, BOOLGADGET, NULL, NULL,
  56.     NULL, NULL, NULL, 5, NULL
  57. };
  58. struct Gadget        Num4    =
  59. {
  60.     &Num5, 94, 0, 21, 13, GADGHNONE, RELVERIFY, BOOLGADGET, NULL, NULL,
  61.     NULL, NULL, NULL, 4, NULL
  62. };
  63. struct Gadget        Num3    =
  64. {
  65.     &Num4, 73, 0, 21, 13, GADGHNONE, RELVERIFY, BOOLGADGET, NULL, NULL,
  66.     NULL, NULL, NULL, 3, NULL
  67. };
  68. struct Gadget        Num2    =
  69. {
  70.     &Num3, 52, 0, 21, 13, GADGHNONE, RELVERIFY, BOOLGADGET, NULL, NULL,
  71.     NULL, NULL, NULL, 2, NULL
  72. };
  73. struct Gadget        Num1    =
  74. {
  75.     &Num2, 31, 0, 21, 13, GADGHNONE, RELVERIFY, BOOLGADGET, NULL, NULL,
  76.     NULL, NULL, NULL, 1, NULL
  77. };
  78. struct Gadget        Num0    =
  79. {
  80.     &Num1, 10, 0, 21, 13, GADGHNONE, RELVERIFY, BOOLGADGET, NULL, NULL,
  81.     NULL, NULL, NULL, 0, NULL
  82. };
  83.  
  84. /************************************************************************
  85. *                                                                                                *
  86. *        *** First List *** ( Displayed as the default )                            *
  87. *                                                                                                *
  88. *        Gadgets:            Style ( Elite, Pica, Prop ), Cond, Letter, LineSP,    *
  89. *                            Num0 - Num9                                                        *
  90. *        Stringgadgets: LMarg, RMarg, TSize                                            *
  91. *        Actiongadgets:    Pre, PPW, PrAll                                                *
  92. *        Special:            Switch1    ( ID #1000 )                                        *
  93. *        List start:        Switch1                                                            *
  94. *                                                                                                *
  95. ************************************************************************/
  96.  
  97. /***************************************
  98.             Buffers and Special infos
  99. ***************************************/
  100.  
  101. UBYTE                    TSize_buf[10];
  102. struct StringInfo    TSize_info    =
  103. {
  104.     &TSize_buf[0], &TSize_buf[5],
  105.     0, 4, 0, 0, 0, 0, 0, 0, NULL, 0L, NULL
  106. };
  107. UBYTE                    LMarg_buf[10];
  108. struct StringInfo    LMarg_info    =
  109. {
  110.     &LMarg_buf[0], &LMarg_buf[5],
  111.     0, 4, 0, 0, 0, 0, 0, 0, NULL, 0L, NULL
  112. };
  113. UBYTE                    RMarg_buf[10];
  114. struct StringInfo    RMarg_info    =
  115. {
  116.     &RMarg_buf[0], &RMarg_buf[5],
  117.     0, 4, 0, 0, 0, 0, 0, 0, NULL, 0L, NULL
  118. };
  119.  
  120. /***************************************
  121.                         Gadgets
  122. ***************************************/
  123.  
  124. struct Gadget        TSize        =
  125. {
  126.     &Num0,
  127.     500, 0, 41, 8, GADGHCOMP,
  128.     RELVERIFY | LONGINT | STRINGRIGHT, STRGADGET, NULL, NULL,
  129.     NULL, NULL, ( APTR )&TSize_info, 16, NULL
  130. };
  131. struct Gadget        LMarg        =
  132. {
  133.     &TSize,
  134.     238, 0, 41, 8, GADGHCOMP,
  135.     RELVERIFY | LONGINT | STRINGRIGHT, STRGADGET, NULL, NULL,
  136.     NULL, NULL, ( APTR )&LMarg_info, 15, NULL
  137. };
  138. struct Gadget        RMarg        =
  139. {
  140.     &LMarg,
  141.     382, 0, 41, 8, GADGHCOMP,
  142.     RELVERIFY | LONGINT | STRINGRIGHT, STRGADGET, NULL, NULL,
  143.     NULL, NULL, ( APTR )&RMarg_info, 14, NULL
  144. };
  145. struct Gadget        LineSP    =
  146. {
  147.     &RMarg,
  148.     11, 0, 135, 13, GADGHNONE,
  149.     RELVERIFY, BOOLGADGET, NULL, NULL,
  150.     NULL, NULL, NULL, 13, NULL
  151. };
  152. struct Gadget        Letter    =
  153. {
  154.     &LineSP,
  155.     439, 0, 105, 13, GADGHNONE,
  156.     RELVERIFY, BOOLGADGET, NULL, NULL,
  157.     NULL, NULL, NULL, 12, NULL
  158. };
  159. struct Gadget        Cond    =
  160. {
  161.     &Letter,
  162.     332, 0, 105, 13, GADGHNONE,
  163.     RELVERIFY, BOOLGADGET, NULL, NULL,
  164.     NULL, NULL, NULL, 11, NULL
  165. };
  166. struct Gadget        Style    =
  167. {
  168.     &Cond,
  169.     231, 0, 99, 13, GADGHNONE,
  170.     RELVERIFY, BOOLGADGET, NULL, NULL,
  171.     NULL, NULL, NULL, 10, NULL
  172. };
  173. struct Gadget        PrAll    =
  174. {
  175.     &Style,
  176.     399, 0, 76, 15, GADGHIMAGE | GADGIMAGE,
  177.     RELVERIFY, BOOLGADGET, (APTR)&PrAll_uns_image, (APTR)&PrAll_sel_image,
  178.     NULL, NULL, NULL, 2002, NULL
  179. };
  180. struct Gadget        PPW    =
  181. {
  182.     &PrAll,
  183.     221, 0, 137, 15, GADGHIMAGE | GADGIMAGE,
  184.     RELVERIFY, BOOLGADGET, (APTR)&PPW_uns_image, (APTR)&PPW_sel_image,
  185.     NULL, NULL, NULL, 2001, NULL
  186. };
  187. struct Gadget        Pre    =
  188. {
  189.     &PPW,
  190.     99, 0, 81, 15, GADGHIMAGE | GADGIMAGE,
  191.     RELVERIFY, BOOLGADGET, (APTR)&PreInit_uns_image, (APTR)&PreInit_sel_image,
  192.     NULL, NULL, NULL, 2000, NULL
  193. };
  194. struct Gadget        Switch1    =
  195. {
  196.     &Pre,
  197.     617,0, 17, 13, GADGHNONE,
  198.     RELVERIFY, BOOLGADGET, NULL, NULL,
  199.     NULL, NULL, NULL, 1000, NULL
  200. };
  201.  
  202. /************************************************************************
  203. *                                                                                                *
  204. *        *** Second List ***                                                                *
  205. *                                                                                                *
  206. *        Gadgets:                Numing ( No, Top, Bottom, Title )                    *
  207. *        Stringgadgets:        PWidth, PHeight                                            *
  208. *        Special:                Switch2    ( ID #1001 )                                    *
  209. *        List Start:            Switch2                                                        *
  210. *                                                                                                *
  211. ************************************************************************/
  212.  
  213. /***************************************
  214.             Buffers and Special infos
  215. ***************************************/
  216.  
  217. UBYTE                    PWidth_buf[10];
  218. struct StringInfo    PWidth_info    =
  219. {
  220.     &PWidth_buf[0], &PWidth_buf[5],
  221.     0, 4, 0, 0, 0, 0, 0, 0, NULL, 0L, NULL
  222. };
  223. UBYTE                    PLength_buf[10];
  224. struct StringInfo    PLength_info    =
  225. {
  226.     &PLength_buf[0], &PLength_buf[5],
  227.     0, 4, 0, 0, 0, 0, 0, 0, NULL, 0L, NULL
  228. };
  229.  
  230. /***************************************
  231.                         Gadgets
  232. ***************************************/
  233.  
  234. struct Gadget        PWidth        =
  235. {
  236.     NULL,
  237.     98, 0, 41, 8, GADGHCOMP,
  238.     RELVERIFY | LONGINT | STRINGRIGHT, STRGADGET, NULL, NULL,
  239.     NULL, NULL, ( APTR )&PWidth_info, 102, NULL
  240. };
  241. struct Gadget        PLength        =
  242. {
  243.     &PWidth,
  244.     98, 0, 41, 8, GADGHCOMP,
  245.     RELVERIFY | LONGINT | STRINGRIGHT, STRGADGET, NULL, NULL,
  246.     NULL, NULL, ( APTR )&PLength_info, 101, NULL
  247. };
  248. struct Gadget        Numing    =
  249. {
  250.     &PLength,
  251.     151, 0, 200, 13, GADGHNONE,
  252.     RELVERIFY, BOOLGADGET, NULL, NULL,
  253.     NULL, NULL, NULL, 100, NULL
  254. };
  255. struct Gadget        Switch2    =
  256. {
  257.     &Numing,
  258.     617, 0, 17, 13, GADGHNONE,
  259.     RELVERIFY, BOOLGADGET, NULL, NULL,
  260.     NULL, NULL, NULL, 1001, NULL
  261. };
  262.